import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {UsersComponent} from './users/users.component';
import {PostsComponent} from "./posts/posts.component";
import {DetailsComponent} from "./details/details.component";
const routes: Routes = [
  {path:'',redirectTo:'login',pathMatch:'full'},
  // { path:'',component:UsersComponent},
  { path:'details/:id',component:DetailsComponent},
  { path:'posts',component:PostsComponent},
  { path:'login',loadChildren:() => import('../app/login/login.module').then(m => m.LoginModule)}
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }
